/*
 * Copyright 2016 Wealth Inc. All rights reserved.
 */
 package com.wealth.merchant.entity;


import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "t_merchant_activity")
public class Activity implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private Long id;
	private String name;
	private Date startTime;
	private Date endTime;
	private Integer limitmoney;
	private Integer cutmoney;
	private Integer status;
	private String creator;
	private Date createTime;
	
	private Merchant merchant;
	
	
	/* ---------------- method ----------------*/
	
	public Activity(){
	}

	public Activity(Long id){
		this.id = id;
	}

	/* ---------------- getter/setter ----------------*/
	
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}
	
	public void setId(Long id) {
		this.id = id;
	}
	
	@Column(name = "name")
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	@Column(name = "start_time")
	public Date getStartTime() {
		return startTime;
	}
	
	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}
	
	@Column(name = "end_time")
	public Date getEndTime() {
		return endTime;
	}
	
	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	
	@Column(name = "limitmoney")
	public Integer getLimitmoney() {
		return limitmoney;
	}
	
	public void setLimitmoney(Integer limitmoney) {
		this.limitmoney = limitmoney;
	}
	
	@Column(name = "cutmoney")
	public Integer getCutmoney() {
		return cutmoney;
	}
	
	public void setCutmoney(Integer cutmoney) {
		this.cutmoney = cutmoney;
	}
	
	@Column(name = "status")
	public Integer getStatus() {
		return status;
	}
	
	public void setStatus(Integer status) {
		this.status = status;
	}
	
	@Column(name = "creator")
	public String getCreator() {
		return creator;
	}
	
	public void setCreator(String creator) {
		this.creator = creator;
	}
	
	@Column(name = "create_time")
	public Date getCreateTime() {
		return createTime;
	}
	
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@ManyToOne
	@JoinColumn(name="merchant_id")
	public Merchant getMerchant() {
		return merchant;
	}

	public void setMerchant(Merchant merchant) {
		this.merchant = merchant;
	}
	
}



